{% extends "base.html" %}

{% block content %}
    <div class="pageHeader">
        <form onsubmit="return navTabSearch(this);" action="demo_page1.html" method="post">
            <div class="searchBar">

                <table class="searchContent">
                    <tbody><tr>
                    <!--
                        <td>
                            帐号：<input type="text" name="keyword" class="textInput">
                        </td>
                     -->
                        <td>
                            起始日期：<input type="text" class="date textInput readonly" name="dt1" value="{{dt1|date:'Y-m-d'}}" readonly="true">
                        </td>
                        <td>
                            终止日期：<input type="text" class="date textInput readonly" name="dt2" value="{{dt2|date:'Y-m-d'}}" readonly="true">
                        </td>
                    </tr>
                    </tbody></table>
                <div class="subBar">
                    <ul>
                        <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>

                    </ul>
                </div>
            </div>
        </form>
    </div>
    <div class="pageContent">
    <table class="list" width="100%"  >
        <thead>
     <tr>
            <th >编号</th>
            <th  >标题</th>
            <th  >关键字</th>
            <th  >创建者</th>
            <th >报表类型</th>
            <th >开始时间</th>
            <th >结束时间</th>
            <th >操作操作</th>
        </tr>
     </thead>
    <tbody>
                {%for schedule in list.object_list%}
                <tr >
                    <td ><div>{{schedule.id}}</div></td>
                    <td ><div>{{schedule.title}}</div></td>
                    <td ><div>{{schedule.keyword}}</div></td>
                    <td ><div>{{schedule.created_by.last_name}}</div></td>
                    <td ><div>{{schedule.schedule_type.name}}</div></td>
                    <td ><div>{{schedule.start_date|date:"Y-m-d"}}</div></td>
                    <td ><div>{{schedule.end_date|date:"Y-m-d"}}</div></td>
                    <td >
                        <div>{%if schedule.status == 0 %}
                            <a href="/schedule/edit/{{schedule.id}}" target="navTab" rel="edit_schedule" title="编辑计划">编辑</a>&nbsp;&nbsp;
                            <a href="/schedule/commit/{{schedule.id}}" target="navTab" rel="commit_schedule" title="提交计划">提交</a>&nbsp;&nbsp;
                            <a href="/schedule/delete/{{schedule.id}}" target="navTab" rel="delete_schedule" title="删除计划">删除</a>{%endif%}&nbsp;&nbsp;
                            <a href="/schedule/view/{{schedule.id}}" target="navTab" rel="view_schedule" title="查看计划">查看</a>
                        </div>
                    </td>
                </tr>
                {%endfor%}
        </tbody>
    </table>


          </div>

        <div class="panelBar hover">
          <div class="pagination" targettype="navTab" totalcount="{{list.count}}" numperpage="10" pagenumshown="10" currentpage="{{list.number}}"></div>
        </div>

{% endblock %}